from ronglian_sms_sdk import SmsSDK
import json

accId = '8a216da87ba59937017bf7c28b60150d'
accToken = 'd3715d75fb2e41a9bdd18f6ef4e1ceab'
appId = '8a216da87ba59937017bf7c28c481514'


# 短信
def send_message(mobile, code, time):
    sdk = SmsSDK(accId, accToken, appId)
    tid = '1'
    mobile = mobile
    datas = (code, time)
    resp = sdk.sendMessage(tid, mobile, datas)
    resplu = json.loads(resp)
    if resplu['statusCode'] == '000000':
        return True
    return False




